clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/within_effects_reactions.dta, clear
     
* Run the analyses
regr sanction nothing_dummy gossip_dummy deny_dummy avoid_dummy insult_dummy verbal_dummy i.id, cluster(id)
estimates store sanctions

* Make table
esttab sanctions using tables/tableb7.tex, ///
mtitles("Willigness to engage in each sanction (own)" ) ///
keep(nothing_dummy gossip_dummy deny_dummy avoid_dummy insult_dummy verbal_dummy _cons) ///
coeflabels(nothing_dummy "Do nothing" gossip_dummy "Gossip" deny_dummy "Deny help" ///
avoid_dummy "Avoid interaction" insult_dummy "Insult" verbal_dummy "Verbal" _cons "Constant") ///
se replace star(* 0.10 ** 0.05 *** 0.01) ///
addnotes("The reference category is the acceptability of physical sanctions" "Standard errors are clustered by respondent" "All models include respondent-level fixed effects")
